package com.woniu.zsd.common.exception;

import com.woniu.zsd.common.util.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler {
    @ExceptionHandler(value = Exception.class)
    public Result<Object> handlerException(Exception e){
        return new Result<Object>(500,e.getMessage(),null);
    }
}
